package org.springblade.modules.platform.dto;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

@NoArgsConstructor
@Data
public class DeviceRuningStateDTO {


    @ApiModelProperty("采集时间")
    private Long acquisitionTime;
    @ApiModelProperty("测量链编号")
    private Long deptMeasuringInfoId;
    @ApiModelProperty("采集时间")
    private String connectionId;
    @ApiModelProperty(value = " 1:定时采集；2：手动采集")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer gatherEvent;

    @ApiModelProperty("采集标识")
    private String acquisitionFlag;

    @ApiModelProperty("真空泵气压值")
    private BigDecimal rietschlePressure;

    @ApiModelProperty("设备集合")
    private List<DeviceListDTO> deviceList;

    @NoArgsConstructor
    @Data
    public static class DeviceListDTO {
        @ApiModelProperty("通道地址ID")
        private String deviceId;
        @ApiModelProperty("属性集合")
        private List<AttributeListDTO> attributeListDTO;

        @NoArgsConstructor
        @Data
        public static class AttributeListDTO{
            @ApiModelProperty("属性")
            private String key;
            @ApiModelProperty("属性值")
            private Integer value;
        }
    }


}
